# $Id: PKGBUILD 83864 2013-02-05 20:31:35Z lcarlier $
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: mightyjaym <jmambrosino@gmail.com>
# Contributor: moostik <mooostik_at_gmail.com>

pkgname=audex
pkgver=0.77b1
pkgrel=1
pkgdesc="A CDDA extraction tool with a ftp upload function for KDE"
arch=('i686' 'x86_64')
url="http://kde-apps.org/content/show.php?content=77125"
license=('GPL')
depends=('kdebase-runtime' 'libkcddb' 'libkcompactdisc' 'cdparanoia')
makedepends=('cmake' 'automoc4')
optdepends=('vorbis-tools: OGG encoder'
	'faac: MP4/M4A/AAC encoder'
	'flac: FLAC encoder'
	'lame: MP3 encoder')
install=${pkgname}.install
#source=("ftp://ftp.archlinux.org/other/community/${pkgname}/${pkgname}-${pkgver}.tar.xz"
source=("http://kde.maniatek.com/${pkgname}/files/${pkgname}-${pkgver}.tar.xz"
        'gcc47.patch')
md5sums=('1f3df64b60b15315e958e3e3b151fe92'
         '64107bcf90e22910e57804be774822dd')

build() {
  cd ${pkgname}-${pkgver}

  patch -p1 -i "${srcdir}"/gcc47.patch
  cd ..

  mkdir build
  cd build

  cmake ../${pkgname}-${pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd ${srcdir}/build
  make DESTDIR=${pkgdir} install
}
